package com.xdw.addressbookbyjava.utils;

import com.xdw.addressbookbyjava.slice.MainAbilitySlice;
import ohos.agp.window.dialog.ToastDialog;
import ohos.app.Context;

/**
 * Created by 夏德旺 on 2021/1/3 23:24
 */
public class ToastUtil {
    public static void showToast(Context context,String msg){
        new ToastDialog(context).setText(msg).setDuration(2000).show();
    }
    public static void showToast(Context context,String msg,int time){
        new ToastDialog(context).setText(msg).setDuration(time).show();
    }
}
